import React, { useEffect } from 'react'
import { useLocation, useHistory } from 'umi'
import { Tag } from 'antd'

const QuestionDetail: React.FC = (props: any) => {

  const history = useHistory();
  const location = useLocation();

  console.log(location)

  // const item=history.location.state;
  // shuju.push=location.state.data.map;

  return (
    <div>
      <h1>详情</h1>
      出题人:{props.location.state.data.user_name}
      <div>题目信息:
        <div>
          <span>
            {props.location.state.data.questions_type_text}
          </span>
          <span>
            {props.location.state.data.subject_text}
          </span>
          <span>
            {props.location.state.data.exam_name}
          </span>
        </div>
      </div>
      <p>
        {props.location.state.data.title}
      </p>
      <div>
        {props.location.state.data.questions_stem}
      </div>
      <div>
        {/* {props.location.state.data} */}
      </div>
    </div>
  );
}

export default QuestionDetail;
